<html>
<head>
<link type="text/css" rel="styleSheet" href="css/default.css" />
<link type="text/css" rel="styleSheet" href="css/css.css" />
<script src="js/vue.min.js"></script>
<script src="js/vue-cookies.js"></script>
<script src="js/jquery-3.5.1.js"></script>
</head>
<body>
	<div id="app">
		<div v-for="a in articles">
			<div class="article" style="">
				<h3 style="margin: 0;">
					<img src="pic/a.jpg" style="width: 26px;" /><a :href="'/article.html?'+a.id" style="color:black;">{{a.title}}</a>
				</h3>
				<div style="height: 20px; overflow: hidden;">{{a.content}}</div>
				<div style="height: 20px; color: grey;">
					<span style="margin: 0 60 0 20">{{a.time}}</span> 
					<span style="margin: 0 60 0 20">赞成:{{a.like}}</span>
					<span style="margin: 0 60 0 20">反对:{{a.nolike}}</span>
				</div>
			</div>
		</div>
	</div>
</body>
<script>
var userid = window.$cookies.get("userid");
	$.ajax({
		url : "http://localhost/getfavorite/"+userid,
		type : "get",
		success : function(response) {
			vm.articles = response;
		}
	});
	var vm = new Vue({
		el : "#app",
		data : {
			articles : "123",
		}
	});
</script>
</html>